
export default [
  // user
  {
    path: '/channeler',
    component: '../layouts/ChannelerLayout',
    authority: ['admin','user','guest','channeler'],
    routes: [
      { path: '/channeler', redirect: '/channeler/login' },
      { path: '/channeler/login', component: './Channeler/Login' },
    ],
  },
  {
    path: '/channelerhome',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin','user','guest','channeler'],
    routes: [
      //activity
      {
        path: '/activity',
        icon: 'sound',
        name: 'activity',
        routes: [
          // { path: '/activity/template',name:'template', component: './Activity/ActivityTemplate'},
          // { path: '/activity/add',name:'add', component: './Activity/AddNewActivity'  },
          { path: '/activity/detail', component: './Activity/ActivityDetail' },
          { path: '/activity/list', name: 'list', component: './Activity/ActivityList' },
          {
            path: '/activity/addtemplate',
            name: 'addtemplate',
            component: './Activity/AddTemplateActivity',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },

  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  {
    path: '/handbook',
    Routes: ['src/pages/Authorized'],
    authority: ['admin','user','guest'],
    component: '../layouts/BlankLayout',
    routes: [
      { path: '/handbook/yhsc', component: '/Handbook/Handbook' },
    ],
  },
  {
    path: '/vip-client',
    icon: 'credit-card',
    name: 'vip',
    authority: ['admin','user','guest'],
    routes: [
      {
        path: '/vip-client/servicesTemplate',
        name: 'template',
        component: './Vip/VipServiceTempalteList',
      },
      {
        path: '/vip-client/addTemplate',
        name: 'addtemplate',
        component: './Vip/AddServiceTemplate',
      },
      { path: '/vip-client/list',
        name: 'list',
        component: './Vip/VipCardList',
      },
      {
        path: '/vip-client/add',
        name: 'add',
        component: './Vip/AddVipCard',
      },
      {
        path: '/vip-client/cardHistory',
        name: 'history',
        component: './Vip/VipCardHistoryList',
      }
    ],
  },
  {
    path: '/print',
    name: 'print',
    authority: ['admin','user','guest'],
    routes: [
      {
        path: '/print/print',
        name: 'print',
        component: './Repair/List/RepairInfoToPrint',
      },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['admin','user'],
    routes: [
      // dashboard
      { path: '/', redirect: '/dashboard/home' },
      {
        path: '/dashboard',
        name: 'dashboard',
        icon: 'shop',
        routes: [
          {
            path: '/dashboard/home',
            name: 'home',
            component: './Dashboard/Home',
          },
          {
            path: '/dashboard/analysis',
            name: 'analysis',
            component: './Dashboard/Analysis',
          },
          // {
          //   path: '/dashboard/monitor',
          //   name: 'monitor',
          //   component: './Dashboard/Monitor',
          // },
          // {
          //   path: '/dashboard/workplace',
          //   name: 'workplace',
          //   component: './Dashboard/Workplace',
          // },
        ],
      },
      //工单
      {
        path: '/repair',
        icon: 'tool',
        name: 'repair',
        routes: [
          { path: '/repair/list', name: 'repairSearch', component: './Repair/List/RepairsList' },
          {
            hideInMenu: true,
            path: '/repair/print',
            name: 'print',
            component: './Repair/List/RepairInfoToPrint',
          },
        ],
      },
      //vip

      //照片墙
      // {
      //   path: '/picturewall',
      //   icon: 'contacts',
      //   name: 'picturewall',
      //   routes: [
      //     { path: '/picturewall/home',name: 'picturewallhome', component: './PictureWall/PictureWall'  },
      //   ],
      // },
      //contact
      {
        path: '/contact',
        icon: 'contacts',
        name: 'contact',
        routes: [
          { path: '/contact', component: './Contact/ContactList' },
          { path: '/contact/contactList', name: 'query', component: './Contact/ContactList' },
          { path: '/contact/addOrEdit', name: 'addOrEdit', component: './Contact/AddNewContact' },
        ],
      },
      // 库存管理
      {
        path: '/inventory',
        icon: 'table',
        name: 'inventory',
        routes: [
          { path: '/inventory/overview', name: 'overview', component: './Inventory/Overview' },
          { path: '/inventory/supplier', name: 'supplier', component: './Inventory/Supplier' },
          { path: '/inventory/partsCategory', name: 'partsCategory', component: './Inventory/PartsCategory' },
          { path: '/inventory/recordLogs', name: 'recordLogs', component: './Inventory/Logs' },
          { path: '/inventory/warning', name: 'storeWarning', component: './Inventory/Warning' },
        ],
      },
      //activity
      {
        path: '/activity',
        icon: 'sound',
        name: 'activity',
        routes: [
          // { path: '/activity/template',name:'template', component: './Activity/ActivityTemplate'},
          // { path: '/activity/add',name:'add', component: './Activity/AddNewActivity'  },
          { path: '/activity/detail', component: './Activity/ActivityDetail' },
          { path: '/activity/list', name: 'list', component: './Activity/ActivityList' },
          {
            path: '/activity/addtemplate',
            name: 'addtemplate',
            component: './Activity/AddTemplateActivity',
          },
        ],
      },
      {
        path: '/news',
        icon: 'sound',
        authority: ['admin'],
        name: 'news',
        routes: [
          { path: '/news/categorys',name:'category', component: './News/Category'},
          { path: '/news/addCategory',name:'addcategory', component: './News/AddCategory',hideInMenu: true,
          },
          { path: '/news/list', name: 'list', component: './News/NewsList' },
          {
            hideInMenu: true,
            path: '/news/addtemplate',
            name: 'addtemplate',
            component: './News/AddTemplateNews',
          },
        ],
      },
      {
        path: '/vip',
        icon: 'credit-card',
        name: 'vip',
        authority: ['admin','user','guest'],
        routes: [
          {
            path: '/vip/servicesTemplate',
            name: 'template',
            component: './Vip/VipServiceTempalteList',
          },
          {
            hideInMenu: true,
            path: '/vip/addTemplate',
            name: 'addtemplate',
            component: './Vip/AddServiceTemplate',
          },
          { path: '/vip/list',
            name: 'list',
            component: './Vip/VipCardList',
          },
          {
            hideInMenu: true,
            path: '/vip/add',
            name: 'add',
            component: './Vip/AddVipCard',
          },
          {
            hideInMenu: true,
            path: '/vip/cardHistory',
            name: 'history',
            component: './Vip/VipCardHistoryList',
          }
        ],
      },
      {
        path: '/sms',
        icon: 'message',
        name: 'sms',
        authority: ['admin','user','guest'],
        routes: [
          {
            path: '/sms/history',
            name: 'history',
            component: './Sms/History',
          },
        ],
      },
      {
        path: '/backup',
        icon: 'copy',
        name: 'backup',
        authority: ['admin','user','guest'],
        component: './Backup/index'
      },
      {
        component: '404',
      },
    ],
  },
];
